<template>
	<view class="recommend">
		<view class="recommendItem" v-for="(item,index) in recommenddata" v-bind:key="index">
			<uni-link :href="item.link" showUnderLine="false"> <!-- 跳转到外部链安装这个标签 -->
				<image :src="item.image"></image>
				<view class="p">{{item.title}}</view>
			</uni-link>
		</view>
	</view>
</template>

<script>
	export default {
		 props:{
			recommenddata:{
				type:Array,
				default:function (){
					return []
				}
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style>
.recommend{
    display: flex;
    text-align: center;
    padding:10px 0;
    border-bottom: 10px solid #eee;
}
.recommendItem{
/*让元素均等分*/
    flex: 1;
}
.recommendItem image{
   width: 160rpx;
   height: 160rpx;
   margin-bottom: 10px;
}
.recommendItem .p{
    font-size: 12px;
}
</style>
